function blob = convertEllipse2Circle(blob, shift, mean_angle)

    blob.circle = Circle;
    blob.circle.center = [0 0];
    
    ha = blob.ellipse.ha;
    hb = blob.ellipse.hb;
    center_ellipse = blob.ellipse.center;
    alpha = blob.ellipse.alpha
    
    if abs(alpha - mean_angle) > pi/2, alpha = alpha -pi; end
    
    if shift == true
        if abs(alpha + pi/2 - mean_angle) > abs(alpha + 3/2*pi - mean_angle)
            dir_angle = alpha + pi*3/2% + pi;
        else
            dir_angle = alpha + pi/2% + pi;
            
        end
        
        dir_angle = mean_angle;
        
        fprintf('dir_angle = %f\n', dir_angle/pi*180);
        
        
        blob.circle.center(1) = center_ellipse(1) + abs(ha-hb) * cos(dir_angle);
        blob.circle.center(2) = center_ellipse(2) + abs(ha-hb) * sin(dir_angle);
    else
        blob.circle.center(1) = center_ellipse(1);
        blob.circle.center(2) = center_ellipse(2);
    end
    
    blob.circle.r = max(ha,hb);